<?php
namespace app\demo\middleware;

use think\Response;

class Detail {
    public function handle($request, \Closure $next){
        $request->type = 'detail';
        return $next($request);
    }

    public function end(Response $response){
        dump(145);
    }
}